define(["jquery","paths","layer","api","tools"],function($,path,layer,api,tool){
   $("#keep, .keep").click(function () {
      var str = $(this).attr("data-c");
      var array = str.split("|");
      var span = $(this).find(".iconfont");
      var obj = {
          type:array[0],
          classify:array[1],
          entity_id:array[2]
      };
      api.ajaxPost("/uc/addCollect",obj,function (res) {
          if(span.hasClass("iconshoucang1")){
             span.removeClass("iconshoucang1");
             span.addClass("iconshoucang")
          }else{
              span.removeClass("iconshoucang");
              span.addClass("iconshoucang1")
          }
      });
   })
});
